export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: "子弹人力云｜无卡发薪｜日薪｜人力行业数字化SaaS管理系统",
    htmlAttrs: {
      lang: "en",
    },
    meta: [
      { charset: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      { hid: "description", name: "description", content: "" },
      { name: "format-detection", content: "telephone=no" },
      { name: "baidu-site-verification", content: "code-uh5Dv2dkPV" },
      { name: "description", content: "劳务公司、人力资源发日薪、周薪、月薪、预支、一秒到员工零钱、记录员工打卡、考勤、提高效率、降低风险、方便快捷" },
      { name: "Keywords", content: "子弹人力云、子弹发薪、日结工管理、日结发薪、发薪系统、薪酬代发、代发工资、劳务公司系统、薪资代发平台、劳务系统、子弹云、考勤打卡、日薪、代发工资方案、企业管理、人力资源、人力资源saas、周薪、月薪、日结保险" },
    ],
    link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
    // script: [
    //   {
    //     src: '~/plugins/isMobile.js'
    //   }
    // ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: ["element-ui/lib/theme-chalk/index.css", "~/assets/css/main.scss"],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: ["@/plugins/element-ui", "@/plugins/vant", {
    src: '@/plugins/isMobile.js',
    ssr: false
  }],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    "@nuxtjs/axios",
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
    baseURL: "/",
  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
    // babel: {
    //   plugins: [
    //     [
    //       'import',
    //       {
    //         libraryName: 'vant',
    //         style: false
    //       },
    //       'vant'
    //     ]
    //   ]
    // }
    postcss: {
      plugins: {
        'postcss-pxtorem': {
          rootValue({ file }) {
            return file.indexOf('vant') !== -1 ? 37.5 : 75
          },
          propList: ['*'],
          exclude(file) {
            return !(file.indexOf('m-') !== -1 || file.indexOf('\\m\\') !== -1)
          },
          selectorBlackList: []
        }
      }
    }
  },
};
